    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 登录
export const loginService = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};

// 树形
export const getMenuTreeService = (userId:any) => {
    return service({
        url: '/user/index/getMenuTree/'+userId,
        method: 'post',
     
    })
};
// 分页
export const getUserListService = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
     data
    })
};
// 品牌分页列表
export const getBrandListService = (data:any) => {
    return service({
        url: '/user/index/getBrandList',
        method: 'post',
     data
    })
};
// 添加品牌
export const addBrandService = (data:any) => {
    return service({
        url: '/user/index/addBrand',
        method: 'post',
     data
    })
};
// 修改状态
export const updateStatusService = (data:any) => {
    return service({
        url: '/user/index/updateStatus',
        method: 'post',
     data
    })
};
// 删除品牌
export const deleteBrandService = (brandId:any) => {
    return service({
        url: '/user/index/deleteBrand/'+brandId,
        method: 'post',
     
    })
};
// 批量删除品牌
export const deleteBrandAllService = (data:any) => {
    return service({
        url: '/user/index/deleteBrandAll',
        method: 'post',
     data
    })
};
// 类型管理树形结构
export const getTypeTreeService = () => {
    return service({
        url: '/user/type/getTypeTree',
        method: 'post',
    
    })
};
// 添加类型管理
export const addTypeService = (data:any) => {
    return service({
        url: '/user/type/addType',
        method: 'post',
        data
    })
};
// 商品分页列表
export const getProdListService = (data:any) => {
    return service({
        url: '/user/prod/getProdList',
        method: 'post',
        data
    })
};
// 获取字典列表
export const getDictListService = (typeId:any) => {
    return service({
        url: '/user/dict/getDictList/'+typeId,
        method: 'post',
   
    })
};
// 树形下拉框
export const getSelectTypeTreeService = () => {
    return service({
        url: '/user/type/getSelectTypeTree',
        method: 'post',
   
    })
};

// 添加商品
export const addProdService = (data:any) => {
    return service({
        url: '/user/prod/addProd',
        method: 'post',
        data
    })
};
// 添加商品附件
export const addProdAttaService = (data:any) => {
    return service({
        url: '/user/prod/addProdAtta',
        method: 'post',
        data
    })
};

// 批量删除商品
export const deleteBatchProdService = (data:any) => {
    return service({
        url: '/user/prod/deleteBatchProd',
        method: 'post',
        data
    })
};
// 单删商品
export const deleteProdService = (prodId:any) => {
    return service({
        url: '/user/prod/deleteProd/'+prodId,
        method: 'post',
        
    })
};
// 订单列表
export const getOrderListService = (data:any) => {
    return service({
        url: '/user/order/getOrderList',
        method: 'post',
        data
    })
};
// 商品详情列表
export const getProInfoListService = () => {
    return service({
        url: '/user/prod/getProInfoList',
        method: 'post',
      
    })
};


// 添加订单
export const addOrderService = (data:any) => {
    return service({
        url: '/user/order/addOrder',
        method: 'post',
      data
    })
};


